package com.youknowme.utility;

import com.youknowme.model.Result;

import android.content.Context;

public class Encrypt {
	
	public Context context;
	private static Encrypt _instance;

	private Encrypt() {
		
	}

	public synchronized void init(Context ctx) {
		if (null == context) {
			context = ctx;
			System.loadLibrary("photoencrypt");
		}
	}
	
	public static synchronized Encrypt getInstance() {
		if (_instance == null) {
			_instance = new Encrypt();
		}		
		return _instance;
	}
	
	public native Result encryFile(String path, String destPath, String pwd);
	
	public native Result decryptFile(String path, String destPath, String pwd);
	
	public native String getEncryptString(String[] params);
	

}
